<!DOCTYPE html>

<html>
<head>
<meta charset="UTF-8">
<link href="style.css" type="text/css" rel="stylesheet">
<title>PROLD/PROLVD/PROLQ/PROLVQ—Bit Rotate Left </title></head>
<body>
<h1>PROLD/PROLVD/PROLQ/PROLVQ—Bit Rotate Left</h1>
<table>
<tr>
<th>Opcode/Instruction</th>
<th>Op / En</th>
<th>64/32 bit Mode Support</th>
<th>CPUID Feature Flag</th>
<th>Description</th></tr>
<tr>
<td>
<p>EVEX.NDS.128.66.0F38.W0 15 /r</p>
<p>VPROLVD xmm1 {k1}{z}, xmm2, xmm3/m128/m32bcst</p></td>
<td>FV-RVM</td>
<td>V/V</td>
<td>AVX512VL AVX512F</td>
<td>Rotate doublewords in xmm2 left by count in the corresponding element of xmm3/m128/m32bcst. Result written to xmm1 under writemask k1.</td></tr>
<tr>
<td>
<p>EVEX.NDD.128.66.0F.W0 72 /1 ib</p>
<p>VPROLD xmm1 {k1}{z}, xmm2/m128/m32bcst, imm8</p></td>
<td>FV-VMI</td>
<td>V/V</td>
<td>AVX512VL AVX512F</td>
<td>Rotate doublewords in xmm2/m128/m32bcst left by imm8. Result written to xmm1 using writemask k1.</td></tr>
<tr>
<td>
<p>EVEX.NDS.128.66.0F38.W1 15 /r</p>
<p>VPROLVQ xmm1 {k1}{z}, xmm2, xmm3/m128/m64bcst</p></td>
<td>FV-RVM</td>
<td>V/V</td>
<td>AVX512VL AVX512F</td>
<td>Rotate quadwords in xmm2 left by count in the corresponding element of xmm3/m128/m64bcst. Result written to xmm1 under writemask k1.</td></tr>
<tr>
<td>
<p>EVEX.NDD.128.66.0F.W1 72 /1 ib</p>
<p>VPROLQ xmm1 {k1}{z}, xmm2/m128/m64bcst, imm8</p></td>
<td>FV-VMI</td>
<td>V/V</td>
<td>AVX512VL AVX512F</td>
<td>Rotate quadwords in xmm2/m128/m64bcst left by imm8. Result written to xmm1 using writemask k1.</td></tr>
<tr>
<td>
<p>EVEX.NDS.256.66.0F38.W0 15 /r</p>
<p>VPROLVD ymm1 {k1}{z}, ymm2, ymm3/m256/m32bcst</p></td>
<td>FV-RVM</td>
<td>V/V</td>
<td>AVX512VL AVX512F</td>
<td>Rotate doublewords in ymm2 left by count in the corresponding element of ymm3/m256/m32bcst. Result written to ymm1 under writemask k1.</td></tr>
<tr>
<td>
<p>EVEX.NDD.256.66.0F.W0 72 /1 ib</p>
<p>VPROLD ymm1 {k1}{z}, ymm2/m256/m32bcst, imm8</p></td>
<td>FV-VMI</td>
<td>V/V</td>
<td>AVX512VL AVX512F</td>
<td>Rotate doublewords in ymm2/m256/m32bcst left by imm8. Result written to ymm1 using writemask k1.</td></tr>
<tr>
<td>
<p>EVEX.NDS.256.66.0F38.W1 15 /r</p>
<p>VPROLVQ ymm1 {k1}{z}, ymm2, ymm3/m256/m64bcst</p></td>
<td>FV-RVM</td>
<td>V/V</td>
<td>AVX512VL AVX512F</td>
<td>Rotate quadwords in ymm2 left by count in the corresponding element of ymm3/m256/m64bcst. Result written to ymm1 under writemask k1.</td></tr>
<tr>
<td>
<p>EVEX.NDD.256.66.0F.W1 72 /1 ib</p>
<p>VPROLQ ymm1 {k1}{z}, ymm2/m256/m64bcst, imm8</p></td>
<td>FV-VMI</td>
<td>V/V</td>
<td>AVX512VL AVX512F</td>
<td>Rotate quadwords in ymm2/m256/m64bcst left by imm8. Result written to ymm1 using writemask k1.</td></tr>
<tr>
<td>
<p>EVEX.NDS.512.66.0F38.W0 15 /r</p>
<p>VPROLVD zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst</p></td>
<td>FV-RVM</td>
<td>V/V</td>
<td>AVX512F</td>
<td>Rotate left of doublewords in zmm2 by count in the corresponding element of zmm3/m512/m32bcst. Result written to zmm1 using writemask k1.</td></tr>
<tr>
<td>
<p>EVEX.NDD.512.66.0F.W0 72 /1 ib</p>
<p>VPROLD zmm1 {k1}{z}, zmm2/m512/m32bcst, imm8</p></td>
<td>FV-VMI</td>
<td>V/V</td>
<td>AVX512F</td>
<td>Rotate left of doublewords in zmm3/m512/m32bcst by imm8. Result written to zmm1 using writemask k1.</td></tr>
<tr>
<td>
<p>EVEX.NDS.512.66.0F38.W1 15 /r</p>
<p>VPROLVQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst</p></td>
<td>FV-RVM</td>
<td>V/V</td>
<td>AVX512F</td>
<td>Rotate quadwords in zmm2 left by count in the corresponding element of zmm3/m512/m64bcst. Result written to zmm1under writemask k1.</td></tr>
<tr>
<td>
<p>EVEX.NDD.512.66.0F.W1 72 /1 ib</p>
<p>VPROLQ zmm1 {k1}{z}, zmm2/m512/m64bcst, imm8</p></td>
<td>FV-VMI</td>
<td>V/V</td>
<td>AVX512F</td>
<td>Rotate quadwords in zmm2/m512/m64bcst left by imm8. Result written to zmm1 using writemask k1.</td></tr></table>
<h3>Instruction Operand Encoding</h3>
<table>
<tr>
<td>Op/En</td>
<td>Operand 1</td>
<td>Operand 2</td>
<td>Operand 3</td>
<td>Operand 4</td></tr>
<tr>
<td>FV-VMI</td>
<td>VEX.vvvv (w)</td>
<td>ModRM:r/m (R)</td>
<td>Imm8</td>
<td>NA</td></tr>
<tr>
<td>FV-RVM</td>
<td>ModRM:reg (w)</td>
<td>EVEX.vvvv (r)</td>
<td>ModRM:r/m (r)</td>
<td>NA</td></tr></table>
<p><strong>Description</strong></p>
<p>Rotates the bits in the individual data elements (doublewords, or quadword) in the first source operand to the left by the number of bits specified in the count operand. If the value specified by the count operand is greater than 31 (for doublewords), or 63 (for a quadword), then the count operand modulo the data size (32 or 64) is used.</p>
<p>EVEX.128 encoded version: The destination operand is a XMM register. The source operand is a XMM register or a memory location (for immediate form). The count operand can come either from an XMM register or a memory location or an 8-bit immediate. Bits (MAX_VL-1:128) of the corresponding ZMM register are zeroed.</p>
<p>EVEX.256 encoded version: The destination operand is a YMM register. The source operand is a YMM register or a memory location (for immediate form). The count operand can come either from an XMM register or a memory location or an 8-bit immediate. Bits (MAX_VL-1:256) of the corresponding ZMM register are zeroed.</p>
<p>EVEX.512 encoded version: The destination operand is a ZMM register updated according to the writemask. For the count operand in immediate form, the source operand can be a ZMM register, a 512-bit memory location or a 512-bit vector broadcasted from a 32/64-bit memory location, the count operand is an 8-bit immediate. For the count operand in variable form, the first source operand (the second operand) is a ZMM register and the counter operand (the third operand) is a ZMM register, a 512-bit memory location or a 512-bit vector broadcasted from a 32/64-bit memory location.</p>
<p><strong>Operation</strong></p>
<p>LEFT_ROTATE_DWORDS(SRC, COUNT_SRC)</p>
<p>COUNT (cid:197)(cid:3)COUNT_SRC modulo 32;</p>
<p>DEST[31:0] (cid:197) (SRC &lt;&lt; COUNT) | (SRC &gt;&gt; (32 - COUNT));</p>
<p>LEFT_ROTATE_QWORDS(SRC, COUNT_SRC)</p>
<p>COUNT (cid:197)(cid:3)COUNT_SRC modulo 64;</p>
<p>DEST[63:0] (cid:197) (SRC &lt;&lt; COUNT) | (SRC &gt;&gt; (64 - COUNT));</p>
<p><strong>VPROLD (EVEX encoded versions)</strong></p>
<p>(KL, VL) = (4, 128), (8, 256), (16, 512)</p>
<p>FOR j (cid:197) 0 TO KL-1</p>
<p>i (cid:197) j * 32</p>
<p>IF k1[j] OR *no writemask* THEN</p>
<p>IF (EVEX.b = 1) AND (SRC1 *is memory*)</p>
<p>THEN DEST[i+31:i] (cid:197) LEFT_ROTATE_DWORDS(SRC1[31:0], imm8)</p>
<p>ELSE DEST[i+31:i] (cid:197) LEFT_ROTATE_DWORDS(SRC1[i+31:i], imm8)</p>
<p>FI;</p>
<p>ELSE</p>
<p>IF *merging-masking*</p>
<p>; merging-masking</p>
<p>THEN *DEST[i+31:i] remains unchanged*</p>
<p>ELSE *zeroing-masking*</p>
<p>; zeroing-masking</p>
<p>DEST[i+31:i] (cid:197) 0</p>
<p>FI</p>
<p>FI;</p>
<p>ENDFOR</p>
<p>DEST[MAX_VL-1:VL] (cid:197) 0</p>
<p><strong>VPROLVD (EVEX encoded versions)</strong></p>
<p>(KL, VL) = (4, 128), (8, 256), (16, 512)</p>
<p>FOR j (cid:197) 0 TO KL-1</p>
<p>i (cid:197) j * 32</p>
<p>IF k1[j] OR *no writemask* THEN</p>
<p>IF (EVEX.b = 1) AND (SRC2 *is memory*)</p>
<p>THEN DEST[i+31:i] (cid:197) LEFT_ROTATE_DWORDS(SRC1[i+31:i], SRC2[31:0])</p>
<p>ELSE DEST[i+31:i] (cid:197) LEFT_ROTATE_DWORDS(SRC1[i+31:i], SRC2[i+31:i])</p>
<p>FI;</p>
<p>ELSE</p>
<p>IF *merging-masking*</p>
<p>; merging-masking</p>
<p>THEN *DEST[i+31:i] remains unchanged*</p>
<p>ELSE *zeroing-masking*</p>
<p>; zeroing-masking</p>
<p>DEST[i+31:i] (cid:197) 0</p>
<p>FI</p>
<p>FI;</p>
<p>ENDFOR</p>
<p>DEST[MAX_VL-1:VL] (cid:197) 0</p>
<p><strong>VPROLQ (EVEX encoded versions)</strong></p>
<p>(KL, VL) = (2, 128), (4, 256), (8, 512)</p>
<p>FOR j (cid:197) 0 TO KL-1</p>
<p>i (cid:197) j * 64</p>
<p>IF k1[j] OR *no writemask* THEN</p>
<p>IF (EVEX.b = 1) AND (SRC1 *is memory*)</p>
<p>THEN DEST[i+63:i] (cid:197) LEFT_ROTATE_QWORDS(SRC1[63:0], imm8)</p>
<p>ELSE DEST[i+63:i] (cid:197) LEFT_ROTATE_QWORDS(SRC1[i+63:i], imm8)</p>
<p>FI;</p>
<p>ELSE</p>
<p>IF *merging-masking*</p>
<p>; merging-masking</p>
<p>THEN *DEST[i+63:i] remains unchanged*</p>
<p>ELSE *zeroing-masking*</p>
<p>; zeroing-masking</p>
<p>DEST[i+63:i] (cid:197) 0</p>
<p>FI</p>
<p>FI;</p>
<p>ENDFOR</p>
<p>DEST[MAX_VL-1:VL] (cid:197) 0</p>
<p><strong>VPROLVQ (EVEX encoded versions)</strong></p>
<p>(KL, VL) = (2, 128), (4, 256), (8, 512)</p>
<p>FOR j (cid:197) 0 TO KL-1</p>
<p>i (cid:197) j * 64</p>
<p>IF k1[j] OR *no writemask* THEN</p>
<p>IF (EVEX.b = 1) AND (SRC2 *is memory*)</p>
<p>THEN DEST[i+63:i] (cid:197) LEFT_ROTATE_QWORDS(SRC1[i+63:i], SRC2[63:0])</p>
<p>ELSE DEST[i+63:i] (cid:197) LEFT_ROTATE_QWORDS(SRC1[i+63:i], SRC2[i+63:i])</p>
<p>FI;</p>
<p>ELSE</p>
<p>IF *merging-masking*</p>
<p>; merging-masking</p>
<p>THEN *DEST[i+63:i] remains unchanged*</p>
<p>ELSE *zeroing-masking*</p>
<p>; zeroing-masking</p>
<p>DEST[i+63:i] (cid:197) 0</p>
<p>FI</p>
<p>FI;</p>
<p>ENDFOR</p>
<p>DEST[MAX_VL-1:VL] (cid:197) 0</p>
<p><strong>Intel C/C++ Compiler Intrinsic Equivalent</strong></p>
<p>VPROLD __m512i _mm512_rol_epi32(__m512i a, int imm);</p>
<p>VPROLD __m512i _mm512_mask_rol_epi32(__m512i a, __mmask16 k, __m512i b, int imm);</p>
<p>VPROLD __m512i _mm512_maskz_rol_epi32( __mmask16 k, __m512i a, int imm);</p>
<p>VPROLD __m256i _mm256_rol_epi32(__m256i a, int imm);</p>
<p>VPROLD __m256i _mm256_mask_rol_epi32(__m256i a, __mmask8 k, __m256i b, int imm);</p>
<p>VPROLD __m256i _mm256_maskz_rol_epi32( __mmask8 k, __m256i a, int imm);</p>
<p>VPROLD __m128i _mm_rol_epi32(__m128i a, int imm);</p>
<p>VPROLD __m128i _mm_mask_rol_epi32(__m128i a, __mmask8 k, __m128i b, int imm);</p>
<p>VPROLD __m128i _mm_maskz_rol_epi32( __mmask8 k, __m128i a, int imm);</p>
<p>VPROLQ __m512i _mm512_rol_epi64(__m512i a, int imm);</p>
<p>VPROLQ __m512i _mm512_mask_rol_epi64(__m512i a, __mmask8 k, __m512i b, int imm);</p>
<p>VPROLQ __m512i _mm512_maskz_rol_epi64(__mmask8 k, __m512i a, int imm);</p>
<p>VPROLQ __m256i _mm256_rol_epi64(__m256i a, int imm);</p>
<p>VPROLQ __m256i _mm256_mask_rol_epi64(__m256i a, __mmask8 k, __m256i b, int imm);</p>
<p>VPROLQ __m256i _mm256_maskz_rol_epi64( __mmask8 k, __m256i a, int imm);</p>
<p>VPROLQ __m128i _mm_rol_epi64(__m128i a, int imm);</p>
<p>VPROLQ __m128i _mm_mask_rol_epi64(__m128i a, __mmask8 k, __m128i b, int imm);</p>
<p>VPROLQ __m128i _mm_maskz_rol_epi64( __mmask8 k, __m128i a, int imm);</p>
<p>VPROLVD __m512i _mm512_rolv_epi32(__m512i a, __m512i cnt);</p>
<p>VPROLVD __m512i _mm512_mask_rolv_epi32(__m512i a, __mmask16 k, __m512i b, __m512i cnt);</p>
<p>VPROLVD __m512i _mm512_maskz_rolv_epi32(__mmask16 k, __m512i a, __m512i cnt);</p>
<p>VPROLVD __m256i _mm256_rolv_epi32(__m256i a, __m256i cnt);</p>
<p>VPROLVD __m256i _mm256_mask_rolv_epi32(__m256i a, __mmask8 k, __m256i b, __m256i cnt);</p>
<p>VPROLVD __m256i _mm256_maskz_rolv_epi32(__mmask8 k, __m256i a, __m256i cnt);</p>
<p>VPROLVD __m128i _mm_rolv_epi32(__m128i a, __m128i cnt);</p>
<p>VPROLVD __m128i _mm_mask_rolv_epi32(__m128i a, __mmask8 k, __m128i b, __m128i cnt);</p>
<p>VPROLVD __m128i _mm_maskz_rolv_epi32(__mmask8 k, __m128i a, __m128i cnt);</p>
<p>VPROLVQ __m512i _mm512_rolv_epi64(__m512i a, __m512i cnt);</p>
<p>VPROLVQ __m512i _mm512_mask_rolv_epi64(__m512i a, __mmask8 k, __m512i b, __m512i cnt);</p>
<p>VPROLVQ __m512i _mm512_maskz_rolv_epi64( __mmask8 k, __m512i a, __m512i cnt);</p>
<p>VPROLVQ __m256i _mm256_rolv_epi64(__m256i a, __m256i cnt);</p>
<p>VPROLVQ __m256i _mm256_mask_rolv_epi64(__m256i a, __mmask8 k, __m256i b, __m256i cnt);</p>
<p>VPROLVQ __m256i _mm256_maskz_rolv_epi64(__mmask8 k, __m256i a, __m256i cnt);</p>
<p>VPROLVQ __m128i _mm_rolv_epi64(__m128i a, __m128i cnt);</p>
<p>VPROLVQ __m128i _mm_mask_rolv_epi64(__m128i a, __mmask8 k, __m128i b, __m128i cnt);</p>
<p>VPROLVQ __m128i _mm_maskz_rolv_epi64(__mmask8 k, __m128i a, __m128i cnt);</p>
<p><strong>SIMD Floating-Point Exceptions</strong></p>
<p>None</p>
<p><strong>Other Exceptions</strong></p>
<p>EVEX-encoded instruction, see Exceptions Type E4.</p></body></html>